import java.util.HashSet;
import java.util.Random;
import java.util.Set;
public class Num {
    public static void main(String[] args) {
        int[] f = new int[21];
        int num = 0;
        Random random = new Random();
        Set<Integer> set = new HashSet<Integer>();
        while(set.size() < 10) {
            num = random.nextInt(20) + 1;
            while (f[num] != 0)  num = random.nextInt(20) + 1;
            set.add(num);
            f[num] = 1;
        }
        System.out.println(set);
    }
}
